feature/DF-680 location maps latlong, E&N and OSGR#287
feature/DF-680 location maps latlong, E&N and OSGR#287davidjamesstone merged 53 commits intomainfrom
Conversation
…ps and postcode lookup plugins
…field base template
…n components on the page
jbarnsley10
left a comment
There was a problem hiding this comment.
Looks really good. Just a couple of very minor comments, and a question or to for my benefit. Approving in principal.
* Add eastingnorthingfield to the list of supported location fields * Add easting northing capability to location maps * Remove unused osgrid * Add easting and northing tests location map client tests * Add map tests with initial field values
| VTS_OUTDOOR_URL: | ||
| 'https://raw.githubusercontent.com/OrdnanceSurvey/OS-Vector-Tile-API-Stylesheets/main/OS_VTS_3857_Outdoor.json', | ||
| VTS_DARK_URL: | ||
| 'https://raw.githubusercontent.com/OrdnanceSurvey/OS-Vector-Tile-API-Stylesheets/main/OS_VTS_3857_Dark.json', | ||
| VTS_BLACK_AND_WHITE_URL: | ||
| 'https://raw.githubusercontent.com/OrdnanceSurvey/OS-Vector-Tile-API-Stylesheets/main/OS_VTS_3857_Black_and_White.json' | ||
| } |
There was a problem hiding this comment.
We should definitely pull these into our app, rather than hardcoding them to Ordnance Survey's github. Since this looks the main branch, if they restructure the repo/delete the files/etc it'll break our app.
I'd rather we downlod a copy and mirror them on our end, that way we can guarantee they'll always be there.
There was a problem hiding this comment.
I've reverted this 9bae11a commit and will work on identifying any subsequent requests made to that domain.
There was a problem hiding this comment.
Resolved with 09da972 and DEFRA/forms-runner@0941c6d
| thumbnail: `${assetPath}/defra-map/assets/images/outdoor-map-thumb.jpg`, | ||
| logo: `${assetPath}/defra-map/assets/images/os-logo.svg`, | ||
| logoAltText, | ||
| attribution: `Contains OS data ${String.fromCodePoint(COMPANY_SYMBOL_CODE)} Crown copyright and database rights ${new Date().getFullYear()}`, |
There was a problem hiding this comment.
this is missing from dark/black-white
| zoom: '16', | ||
| center, | ||
| markers: [ | ||
| { | ||
| id: 'location', | ||
| coords: center | ||
| } | ||
| ] |
There was a problem hiding this comment.
worth pulling these (except center) into a constant and reusing them between the different inputs? so we don't get any drift between the individual component's maps
| // Move the 'location' marker to the new point | ||
| map.addMarker('location', center) | ||
|
|
||
| // Pan & zoom the map to the new valid location | ||
| mapProvider.flyTo({ | ||
| center, | ||
| zoom: 14, | ||
| essential: true |
There was a problem hiding this comment.
could pull this out into a centerMap(center) and share it between the component handlers?
|
This is great stuff, Dave 🚀 Only one major comment really (styles), everything else is fairly trivial. |
…s e.g. sprites)" This reverts commit 9bae11a.
|



Proposed change
Add map capability to the LatLong location field using defra-map
Jira ticket: https://eaflood.atlassian.net/browse/DF-680
Type of change
Checklist
README.mdanddocs/*(where appropriate, e.g. new features).npm run test).npm run lint).npm run format).